package com.wd.mylibrary_login.fragment



import android.view.View
import android.widget.ImageView

import androidx.recyclerview.widget.GridLayoutManager
import coil.load
import com.ayvytr.adapter.smart
import com.wd.mylibrary_base.base.BaseFragment
import com.wd.mylibrary_login.R
import com.wd.mylibrary_login.databinding.FragmentConstellationsBinding
import com.wd.mylibrary_login.viewmodel.ConstellationsViewModel




class ConstellationsFragment : BaseFragment<ConstellationsViewModel,FragmentConstellationsBinding>(R.layout.fragment_constellations) {



//    var  arr= mutableListOf(ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),
//        ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008)
//        ,ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008),ImageBean(R.mipmap.sign008))

//    var list=smart(mutableListOf<ImBean.Result>(),R.layout.rec_xing,{item, position ->
//        findViewById<ImageView>(R.id.imgView).load(item.imageUrl)
//
//    }) {  }
    var flag:Int=1
    override fun dataObserve() {
//        viewModel.Img.observe(this,{
//             list.update(it.result,true)
//        })

    }
    override fun initView() {

//        viewModel.getImg()
//        dataBinding.recXi.adapter=list
//        dataBinding.recXi.layoutManager=GridLayoutManager(context,2)
         dataBinding.sign1.setOnClickListener(View.OnClickListener {
                if (this.flag==1){
                    dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign_01)
                    dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                    dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                    dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                    dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                    dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                    dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                    dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                    dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                    dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                    dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                    dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

                }

         })
        dataBinding.sign2.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign_02)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }

        })
        dataBinding.sign3.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign_03)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign4.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign_04)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign5.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign_05)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign6.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign_06)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign7.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign_07)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign8.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign_08)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign9.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign_09)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign10.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign_10)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign11.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign_11)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign012)

            }
        })
        dataBinding.sign12.setOnClickListener(View.OnClickListener {
            if (this.flag==1){
                dataBinding.sign1.findViewById<ImageView>(R.id.sign1).load(R.mipmap.sign001)
                dataBinding.sign2.findViewById<ImageView>(R.id.sign2).load(R.mipmap.sign002)
                dataBinding.sign3.findViewById<ImageView>(R.id.sign3).load(R.mipmap.sign003)
                dataBinding.sign4.findViewById<ImageView>(R.id.sign4).load(R.mipmap.sign004)
                dataBinding.sign5.findViewById<ImageView>(R.id.sign5).load(R.mipmap.sign005)
                dataBinding.sign6.findViewById<ImageView>(R.id.sign6).load(R.mipmap.sign006)
                dataBinding.sign7.findViewById<ImageView>(R.id.sign7).load(R.mipmap.sign007)
                dataBinding.sign8.findViewById<ImageView>(R.id.sign8).load(R.mipmap.sign008)
                dataBinding.sign9.findViewById<ImageView>(R.id.sign9).load(R.mipmap.sign009)
                dataBinding.sign10.findViewById<ImageView>(R.id.sign10).load(R.mipmap.sign010)
                dataBinding.sign11.findViewById<ImageView>(R.id.sign11).load(R.mipmap.sign011)
                dataBinding.sign12.findViewById<ImageView>(R.id.sign12).load(R.mipmap.sign_12)

            }
        })



    }
}